package com.helloworld;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.menu_open_activity_main:
			startActivity(new Intent(this, MainActivity.class));
			finish();
			break;
		case R.id.menu_open_activity_main_2:
			startActivity(new Intent(this, MainActivity2_.class));
			finish();
			break;
		default:
			break;
		}
		return super.onOptionsItemSelected(item);
	}
}